<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="comm.util.RequestManager"%>
<%@page import="comm.util.QuikHashMap"%>
<%@page import="quik.dbtest.DbTest"%>
<%
	DbTest test = new DbTest();
	String resultTest = test.testDbConnection();
	QuikHashMap hm = RequestManager.getRequest(request);
%>


<title>Quik</title>

<%if(hm.get("AFTER")!=null){ %>
 <div>회원가입 완료. 로그인해주세요.</div>
<%}%>

<%if(session.getAttribute("SESSION_MEMBER_SEQ")!=null){ %>
	<jsp:forward page="/?content=mypage"></jsp:forward>
<%}else{%>

<div style="width:450px;text-align: center;margin:0 auto;padding-top:150px;">
	<form method="POST" action="./jsp/member/member_trylogin_proc.jsp">
	
	<%if(hm.get("ERROR")!=null){ %>
	<p style="color:red;">이메일 또는 비밀번호가 틀렸습니다.</p>
	<%} %>
	<table width="450px;" style="margin:0 auto;font-size:17px;font-weight: bold;line-height:45px;">
		<colgroup>
			<col align="center" width="80px"/>
			<col align="center" width="250px"/>
		</colgroup>
		<tr>
			<td>이메일</td>
			<td><input type="text" name="member_email" style="width:230px;height:25px;padding:5px 0 0 5px;"/></td>
		</tr>
		<tr>
			<td>비밀번호</td>
			<td>
				<input type="password" name="member_password" style="width:175px;height:25px;padding:5px 0 0 5px;"/>
				<input type="submit" value="로그인" style="font-size:13px;height:28px;vertical-align:text-top;"/>
			</td>
		</tr>
		<tfoot>
			<tr>
				
				<td>
					
					
				</td>
				<td colspan="2">
					<a href="./?content=member&sub=register">회원가입</a>
					<span style="padding:0 15px;">/</span>
					<a href="./?content=member&sub=find">비밀번호 찾기</a>
				</td>
			</tr>
		</tfoot>
	</table>
	</form>
</div>
<%if(!resultTest.equals("SUCCESS")){%>
<div style="color:red;"><%=resultTest%></div>
<%}%>
<%}%>